#pragma once
#include <Windows.h>
#include <time.h>

class DXTimer
{
	/////////////////////////////////////////////////////////////////////////////////////////////////////
	/*Normal Data Types that are ordered from the Highest to lowest in bit size*/
	/////////////////////////////////////////////////////////////////////////////////////////////////////

	/*The int used to convert counts to seconds*/
	__int64 cntsPerSec;

	/*Int to hold the previous time stamp*/
	__int64 prevTimeStamp;

	/*Int to hold the current time stamp*/
	__int64 currTimeStamp;

	/*Float to hold the difference between the two time stamps*/
	float dt;

	/*Float used to convert the time stamps to seconds*/
	float secsPerCnt;

	/*Int to hold the start time of the item*/
	int startTime;

	/////////////////////////////////////////////////////////////////////////////////////////////////////
	/*4bytes and Less Variables*/
	/////////////////////////////////////////////////////////////////////////////////////////////////////

	/*Bool to hold the flag of whether the time is up or not*/
	bool isFinished;
	
	/*Bool to hold the flag of whether its timed or not*/
	bool timed;

public:

	/*The default constructor*/
	DXTimer(void);

	/*The default Destructor*/
	~DXTimer(void);
	
	/*Function to update the difference in counts, as well as getting the current time stamp*/
	void update();

	/*Function to return the difference in time stamps back*/
	float getDT();

	/*Function to Start and set the timer*/
	void SetTimer();

	/*Function to check to see if the timer has started*/
	bool IsTimed();

	/*Function to check the timer*/
	bool CheckTimer(int value);
};

